package com.example.user.service.login;

import com.example.framework.common.factory.FactoryConcrete;
import com.example.framework.security.core.dto.JwtTokenRespDto;
import com.example.user.constants.LoginTypeEnum;
import com.example.user.controller.auth.vo.LoginReqVO;
import org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider;
import org.springframework.security.core.Authentication;

public interface LoginService extends FactoryConcrete<LoginTypeEnum> {

    /**
     * 原本的查询、校验密码的逻辑都在 {@link AbstractUserDetailsAuthenticationProvider#authenticate(Authentication)} 中
     *
     * @param loginReqVO 登录参数
     * @return jwt token
     */
    JwtTokenRespDto login(LoginReqVO loginReqVO);
}
